package com.cd.learn.cdlearn.pattern.combination;

/**
 * @ClassName MenuComponent
 * @Description 菜单的抽像类，其子类可以选择性的实现一些方法，然后将枝子节点和叶子节点组合到一起，成为树形数据格式。
 * @Author seven
 * @Date 2021/7/421:10
 * @Version 1.0
 **/
public abstract class MenuComponent {

    protected String name;

    protected Integer level;


    public void add(MenuComponent menuComponent){
        throw new UnsupportedOperationException();
    }

    public void remove(MenuComponent menuComponent){
        throw new UnsupportedOperationException();
    }

    public void showName(){
        throw new UnsupportedOperationException();
    }

    public MenuComponent getChildren(int i){
        throw new UnsupportedOperationException();
    }

}
